function t_menu__highlightActiveLinks(e){var t=window.location.href,n,r=window.location.pathname;"/"===t[t.length-1]&&(n=t.slice(0,-1)),"/"===r[r.length-1]&&(r=r.slice(0,-1)),"/"===r[0]&&(r=r.slice(1)),""===r&&(r="/");var o=document.querySelectorAll(e);Array.prototype.forEach.call(o,(function(e){var o=e.getAttribute("href");if(o){var i=e.href;i!==t&&i!==r&&o!==t&&o!==r&&n!==t&&n!==r||e.classList.add("t-active")}}))}function t_menu__findAnchorLinks(e,t){var n=document.getElementById("rec"+e),r=t+'[href*="#"]:not(.tooltipstered)',o=n?n.querySelectorAll(r):[];o.length&&t_menu__updateActiveLinks(o,t)}function t_menu__updateActiveLinks(e,t){var n=t.slice(2);n=".t"+(n=parseInt(n,10)),e=Array.prototype.slice.call(e);var r=null,o=[],i={};(e=e.reverse()).forEach((function(e){var t=t_menu__getSectionByHref(e);t&&t.id&&(o.push(t),i[t.id]=e)})),t_menu__updateSectionsOffsets(o),o.sort((function(e,t){var n=parseInt(e.getAttribute("data-offset-top"),10)||0,r;return(parseInt(t.getAttribute("data-offset-top"),10)||0)-n})),window.addEventListener("resize",t_throttle((function(){t_menu__updateSectionsOffsets(o)}),200));var a=document.querySelectorAll(n);Array.prototype.forEach.call(a,(function(e){e.addEventListener("displayChanged",(function(){t_menu__updateSectionsOffsets(o)}))})),setInterval((function(){t_menu__updateSectionsOffsets(o)}),5e3),t_menu__highlightNavLinks(e,o,i,r),e.forEach((function(t,n){t.addEventListener("click",(function(){var o=t_menu__getSectionByHref(t);!t.classList.contains("tooltipstered")&&o&&o.id&&(e.forEach((function(e,t){t===n?e.classList.add("t-active"):e.classList.remove("t-active")})),r=o.id)}))})),window.addEventListener("scroll",t_throttle((function(){r=t_menu__highlightNavLinks(e,o,i,r)}),100))}function t_menu__updateSectionsOffsets(e){e.forEach((function(e){var t=e.getBoundingClientRect().top+window.pageYOffset;e.setAttribute("data-offset-top",t.toString())}))}function t_menu__getSectionByHref(e){if(e){var t=e.getAttribute("href"),n=t?t.replace(/\s+/g,""):"";if(0===n.indexOf("/")&&(n=n.slice(1)),t&&e.matches('[href*="#rec"]'))return n=n.replace(/.*#/,""),document.getElementById(n);var r=t?t.trim():"",o=-1!==r.indexOf("#")&&r.indexOf("#");"number"==typeof o?r=r.slice(o+1):"number"==typeof(o=-1!==r.indexOf("/")&&r.indexOf("/"))&&(r=r.slice(o+1));var i='.r[data-record-type="215"] a[name="'+r+'"]';return document.querySelector(i)?document.querySelector(i).closest(".r"):null}}function t_menu__highlightNavLinks(e,t,n,r){if(document.documentElement.classList.contains("t-body_scroll-locked"))return null;var o=window.pageYOffset,i=Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight),a=r,l=t.length?t[t.length-1]:null,s=l&&parseInt(l.getAttribute("data-offset-top"),10)||0;if(t.length&&null===r&&s>o+300)return e.forEach((function(e){e.classList.remove("t-active")})),null;for(var u=0;u=c||0===u&&o>=i-window.innerHeight){null===r&&d&&!d.classList.contains("t-active")?(e.forEach((function(e){e.classList.remove("t-active")})),d&&d.classList.add("t-active"),a=null):null!==r&&t[u].id&&r===t[u].id&&(a=null);break}}return a}function t_menu__setBGcolor(e,t){var n=document.querySelectorAll(t);Array.prototype.forEach.call(n,(function(e){window.innerWidth>980?"yes"===e.getAttribute("data-bgcolor-setbyscript")&&(e.style.backgroundColor=e.getAttribute("data-bgcolor-rgba")):(e.style.backgroundColor=e.getAttribute("data-bgcolor-hex"),e.setAttribute("data-bgcolor-setbyscript","yes"),e.style.transform&&(e.style.transform=""),e.style.opacity&&(e.style.opacity=""))}))}function t_menu__showFixedMenu(e,t){var n,r=[".t280",".t282",".t450",".t451",".t466",".t453"].some((function(e){return e===t}));if(!(window.innerWidth<=980)||r){var o=document.getElementById("rec"+e);if(!o)return!1;var i=o.querySelectorAll(t);Array.prototype.forEach.call(i,(function(e){var t=e.getAttribute("data-appearoffset");if(t){-1!==t.indexOf("vh")&&(t=Math.floor(window.innerHeight*(parseInt(t)/100))),t=parseInt(t,10);var n=e.clientHeight;"number"==typeof t&&window.pageYOffset>=t?e.style.transform==="translateY(-"+n+"px)"&&t_menu__slideElement(e,n,"toBottom"):"translateY(0px)"===e.style.transform?t_menu__slideElement(e,n,"toTop"):(e.style.transform="translateY(-"+n+"px)",e.style.opacity="0")}}))}}function t_menu__changeBgOpacity(e,t){var n,r=["t280","t282","t451","t466"].some((function(e){return-1!==t.indexOf(e)}));if(!(window.innerWidth<=980)||r){var o=document.getElementById("rec"+e);if(!o)return!1;var i=o.querySelectorAll(t);Array.prototype.forEach.call(i,(function(e){var t=e.getAttribute("data-bgcolor-rgba"),n=e.getAttribute("data-bgcolor-rgba-afterscroll"),r=e.getAttribute("data-bgopacity"),o=e.getAttribute("data-bgopacity-two"),i=e.getAttribute("data-menushadow")||"0",a="100"===i?i:"0."+i;e.style.backgroundColor=window.pageYOffset>20?n:t,window.pageYOffset>20&&"0"===o||window.pageYOffset<=20&&"0.0"===r||" "===i?e.style.boxShadow="none":e.style.boxShadow="0px 1px 3px rgba(0,0,0,"+a+")"}))}}function t_menu__createMobileMenu(e,t){var n=document.getElementById("rec"+e);if(n){var r=n.querySelector(t),o=r?r.getAttribute("data-mobile-burgerhook"):"",i=n.querySelector(t+"__mobile"),a=i||n.querySelector(".tmenu-mobile"),l=i?t.slice(1)+"_opened":"tmenu-mobile_opened",s="t-menuburger-opened";if(a)if(r&&r.classList.contains(t.slice(1)+"__mobile_burgerhook")&&o){if(a.querySelector(".tmenu-mobile__burger"))var u=a.querySelector(".tmenu-mobile__burger");else if(a.querySelector(".t-menuburger"))var u=a.querySelector(".t-menuburger");if(u){var c=u.parentElement,d=document.createElement("a");d.href=o,c&&(d.appendChild(u),c.appendChild(d))}}else{var u=a.querySelector(".t-menuburger");a.addEventListener("click",(function(n){if(!n.target.closest("a")){if(a.classList.contains(l))t_menu__FadeOut(r,300),a.classList.remove(l),u.classList.remove(s);else if(t_menu__fadeIn(r,300,(function(){r.style.transform&&(r.style.transform=""),r.style.opacity&&(r.style.opacity="")})),a.classList.add(l),u.classList.add(s),r.classList.contains("tmenu-mobile__menucontent_fixed")){var o=getComputedStyle(a).height;r.style.top=o}t_menu_checkOverflow(e,t)}}))}window.innerWidth<980&&n.addEventListener("click",(function(n){if(r&&r.classList.contains("tmenu-mobile__menucontent_fixed")){var o=n.target.closest(".t-menu__link-item, .t978__submenu-link, .t966__menu-link, .t-menusub__link-item, .t-btn"),i,c;if(o)["t978__menu-link_hook","t978__tm-link","t966__tm-link","t794__tm-link","t-menusub__target-link"].some((function(e){return o.classList.contains(e)}))?r.addEventListener("menuOverflow",(function(){t_menu_checkOverflow(e,t)})):(t_menu__FadeOut(r,300),a&&a.classList.remove(l),a&&u.classList.remove(s))}})),window.addEventListener("resize",t_throttle((function(){window.innerWidth>980&&(r&&(r.style.opacity=""),r&&(r.style.display=""),r&&(r.style.top=""),a&&a.classList.remove(l)),t_menu_checkOverflow(e,t)}),200))}}function t_menu_checkOverflow(e,t){var n=document.getElementById("rec"+e),r=n?n.querySelector(t):null;if(r){var o=n.querySelector(t+"__mobile"),i=o||n.querySelector(".tmenu-mobile");if(i){var a=i.offsetHeight,l=document.documentElement.clientHeight,s=r.style.position||window.getComputedStyle(r).position,u=r.offsetHeight;"fixed"===s&&u>l-a&&(r.style.overflow="auto",r.style.maxHeight="calc(100% - "+a+"px)")}}}function t_menu__FadeOut(e,t,n){if(!e)return!1;var r=1;t=parseInt(t,10);var o,i=setInterval((function(){e.style.opacity=r,(r-=.1)<=.1&&(e.style.opacity="0",e.style.display="none","function"==typeof n&&n(),clearInterval(i))}),t>0?t/10:40)}function t_menu__fadeIn(e,t,n){if(!e)return!1;if(("1"===getComputedStyle(e).opacity||""===getComputedStyle(e).opacity)&&"none"!==getComputedStyle(e).display)return!1;var r=0,o=(t=parseInt(t,10))>0?t/10:40;e.style.opacity=r,e.style.display="block";var i=setInterval((function(){e.style.opacity=r,(r+=.1)>=1&&(e.style.opacity="1","function"==typeof n&&n(),clearInterval(i))}),o)}function t_menu__slideElement(e,t,n){var r="toTop"===n?0:t,o="toTop"===n?1:0,i=setInterval((function(){e.style.transform="translateY(-"+r+"px)",e.style.opacity=o.toString(),o="toTop"===n?o-.1:o+.1,r="toTop"===n?r+t/20:r-t/20,"toTop"===n&&r>=t&&(e.style.transform="translateY(-"+t+"px)",e.style.opacity="0",clearInterval(i)),"toBottom"===n&&r<=0&&(e.style.transform="translateY(0px)",e.style.opacity="1",clearInterval(i))}),10)}function t_menu__interactFromKeyboard(e){var t=document.getElementById("rec"+e);if(t){var n=t.querySelectorAll('[role="menubar"] > li > a'),r=t.querySelectorAll('[role="menubar"] > li li'),o=9,i=13,a=27,l=32,s=37,u=38,c=39,d=40,f=0,m,_=function(e){e===n.length?e=0:e<0&&(e=n.length-1),n[e].focus(),f=e},p=function(e,t){var n=e.querySelectorAll("a");t==n.length?t=0:t<0&&(t=n.length-1),n[t].focus(),m=t},y=function(e){e.addEventListener("keydown",(function(t){var r=this.parentNode.querySelector(".t-menusub__list");switch(t.keyCode){case c:_(f+1);break;case s:_(f-1);break;case o:if(!t.shiftKey&&f<=n.length-2)_(f+1);else{if(!(t.shiftKey&&f>0))return void e.setAttribute("tabindex","0");_(f-1)}break;case i:case d:case l:if(!r)return;this.click(),m=0,p(r,0);break;case u:if(!r)return;this.click(),m=r.querySelectorAll("li").length-1,p(r,m)}t.preventDefault()}))},b=function(e){e.addEventListener("focus",(function(){m=0,Array.prototype.forEach.call(n,(function(e){e.hasAttribute("aria-haspopup")&&e.setAttribute("aria-expanded","false")})),0!==f&&0===Number(this.getAttribute("tabindex"))&&this.setAttribute("tabindex",-1)}))},h=function(e){var t=e.parentNode.querySelector(".t-menusub__menu");e.addEventListener("click",(function(n){if("true"!==this.getAttribute("aria-haspopup")||"false"!=this.getAttribute("aria-expanded")&&null!=this.getAttribute("aria-expanded"))this.setAttribute("aria-expanded","false");else{this.setAttribute("aria-expanded","true");var r=e.nextElementSibling,o=r?r.getAttribute("data-submenu-margin"):0;t_menusub__showSubmenu(e,t,o)}return n.preventDefault(),!1}))},g=function(e){var t=e.closest(".t-menusub__menu"),r=!1;e.addEventListener("keydown",(function(e){var y=this.parentNode;switch(e.keyCode){case o:r=!0;var b=y.querySelectorAll(".t-menusub__link-item").length;if(e.shiftKey)0===m?(_(f),t_menusub__hideSubmenu(t)):p(y,m-1);else if(m===b-1){if(t_menusub__hideSubmenu(t),f===n.length-1)return void n[f].setAttribute("tabindex","0");_(f+1)}else p(y,m+1);break;case c:r=!0,_(f+1),t_menusub__hideSubmenu(t);break;case s:r=!0,_(f-1),t_menusub__hideSubmenu(t);break;case i:case l:r=!1,t_menusub__hideSubmenu(t);break;case a:r=!0,_(f),t_menusub__hideSubmenu(t);break;case d:r=!0,p(y,m+1);break;case u:r=!0,p(y,m-1)}r&&(e.preventDefault(),e.stopPropagation())}))};Array.prototype.forEach.call(n,(function(e,t){var n;0==t?e.setAttribute("tabindex","0"):e.setAttribute("tabindex","-1"),b(e),y(e),e.parentNode.querySelector(".t-menusub__menu")&&!window.isMobile&&h(e)})),Array.prototype.forEach.call(r,(function(e){e.setAttribute("tabindex","-1"),g(e)}))}}Element.prototype.matches||(Element.prototype.matches=Element.prototype.matchesSelector||Element.prototype.msMatchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.webkitMatchesSelector||Element.prototype.oMatchesSelector);